namespace devtm.Emit
{
    using System;
    

    [Serializable]
    public class IterationStatement : Statement
    {
        private Statement incrementStatement;
        private Statement initStatement;
        private StatementCollection statements;
        private Expression testExpression;

        public IterationStatement()
        {
            this.statements = new StatementCollection();
        }

        public IterationStatement(Statement initStatement, Expression testExpression, Statement incrementStatement, params Statement[] statements)
        {
            this.statements = new StatementCollection();
            this.InitStatement = initStatement;
            this.TestExpression = testExpression;
            this.IncrementStatement = incrementStatement;
            this.Statements.AddRange(statements);
        }

        public Statement IncrementStatement
        {
            get
            {
                return this.incrementStatement;
            }
            set
            {
                this.incrementStatement = value;
            }
        }

        public Statement InitStatement
        {
            get
            {
                return this.initStatement;
            }
            set
            {
                this.initStatement = value;
            }
        }

        public StatementCollection Statements
        {
            get
            {
                return this.statements;
            }
        }

        public Expression TestExpression
        {
            get
            {
                return this.testExpression;
            }
            set
            {
                this.testExpression = value;
            }
        }

        public override object Visit(Object parent, object builder)
        {
            throw new NotImplementedException();
        }
    }
}
